/**
* Function {$form->form_name}, General code for Grid View
* @author: auto
* @param array $params
* @return Zend_Db_Select_Abstract
*/
public function {$form->form_variable}($params){    
    
    //sql for list {$form->query_name} 
    

    $select = $this->select()
                ->from("{$form->table.query_table_name}", array(
                {foreach $form->select as $select}
                    '{$select->table_name}.{$select->field_name}{if !isset($select->field_name)} as {$select->alias} {/if}',
                {/foreach}    
                ))
                ->setIntegrityCheck(FALSE)
    {foreach $form->table_join as $table}
        ->join{$table->query_table_join_type}("{$table->query_table_join_name}", "{$table->query_table_join_name}.{$table->query_table_join_field} = {$table->query_table_join_name2}.{$table->query_table_join_field2}", array())
    {/foreach};
    return $select;
}